# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=btfs
pkgver=2.24
pkgrel=3
pkgdesc="A bittorrent filesystem based on FUSE"
arch=('loong64' 'x86_64')
url="https://github.com/johang/btfs"
license=('GPL')
depends=('fuse2' 'libtorrent-rasterbar' 'curl')
makedepends=('boost')
optdepends=('python: for btplay')
source=("$pkgname-$pkgver.tar.gz::https://github.com/johang/btfs/archive/v$pkgver.tar.gz")
sha512sums=('33339d9eefe6836c8c96c4ea0fb6ee99150df5500f4d1dce107c20df72e0d2959152fca0901676cec1eebf1de39a69dc46ea96442aecd234c9fb4e7618337b0c')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -i
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
